<template>
  <div>
    <div class="item" v-for="(item, index) of list" :key="index">
      <div class="item-title border-bottom">
        <span class="item-title-icon">&#xe652;</span>
        {{ item.title }}
      </div>
      <div class="item-wrapper border-bottom">
        <div class="item-subtitle">
          {{ item.subTitle }}<span class="item-desc">{{ item.desc }}</span>
        </div>
        <div class="item-price">¥{{ item.price }}</div>
      </div>

      <div class="item-chilren" v-if="item.children">
        <detail-list :list="item.children"></detail-list>
      </div>
    </div>
  </div>
</template>

<script>
/* eslint-disable */
export default {
  name: "DetailList",
  props: {
    list: Array,
  },
};
</script>

<style  scoped>
.item-title {
  line-height: 0.8rem;
  font-size: 0.32rem;
  padding: 0 0.2rem;
}

.item-wrapper {
  display: flex;
  align-items: center;
}

.item-subtitle {
  flex: 1;
  line-height: 0.6rem;
  font-size: 0.3rem;
  padding: 0 0.5rem;
  font-weight: 800;
}

.item-desc {
  padding-left: 0.1rem;
  color: #999;
  font-size: 0.28rem;
}

.item-price {
  width: 1.8rem;
  text-align: center;
  font-size: 0.42rem;
  color: #ff9900;
}
.item-chilren {
  padding: 0 0.5rem;
}
</style>
